<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <script src="../vue.js"></script>
    <title>Document</title>
  </head>
  <body>
    <div id="app">
        <!-- 页面上输入 -->
        姓: <input type="text" v-model="firstname"> <br>
        名: <input type="text" v-model="lastName"> <br>
        全名: <span>{{firstName}}---{{lastName}} {{num1+num2}}</span>
    <!-- {{}}可以写js表达式
    表达式? 语句
    表达式: b+c x===y? "a":"b"
    语句: if(){}  for(){}
    
    -->
    </div>
    <script>
      var app = new Vue({
        el: "#app",
        data: {
            num1:8,
            num2:10,
            firstName:"只因",
            lastName:"鸡你太美"
        },
        methods: {
            demo(){
                return 1;
            }
        }
      });
    </script>
  </body>
</html>
